import {createRouter, createWebHistory} from "vue-router";

// 导入组件
import Login from "../views/Login.vue";
import Index from "../views/Index.vue";
import Register from "@/views/Register.vue";
// 定义路由关系
const routes = [
  {path: "/", component: Login},
  {path: "/index", component: Index},
  {path: "/login", component: Login},
  {path: "/register", component: Register}
]

// 创建路由器
const router = createRouter({
  history: createWebHistory(),
  routes,
})

// 导出路由

export default router;
